package com.avecsys.quotemanager.service.buyer;

import java.util.List;

import com.avecsys.quotemanager.exception.BusinessException;
import com.avecsys.quotemanager.pojos.BuyerMasterPojo;
import com.avecsys.quotemanager.pojos.BuyerUsersPojo;
import com.avecsys.quotemanager.pojos.SupplierMasterPojo;
import com.avecsys.quotemanager.utils.TransactionStatus;
import com.avecsys.quotemanager.vo.BuyerVO;

public interface BuyerMasterService
{

	/**
	 * Method to save the Buyer master information
	 * 
	 * @param supplierVO
	 * @return Integer
	 * @throws BusinessException
	 */
	public abstract TransactionStatus saveBuyerMaster(BuyerVO buyerBo) throws BusinessException;


	/**
	 * Method to delete the buyer master information
	 * 
	 * @param buyerMasterPojo
	 * @return TransactionStatus
	 * @throws BusinessException
	 */
	public TransactionStatus deleteBuyerMaster(BuyerMasterPojo buyerMasterPojo) throws BusinessException;

	/**
	 * Method to get the buyer master information by buyer id
	 * 
	 * @param buyer
	 * @return BuyerMasterPojo instance
	 * @throws BusinessException
	 */
	public BuyerMasterPojo getBuyerMasterById(Long buyerId) throws BusinessException;

	/**
	 * @param buyerMasterPojo
	 * @return List<BuyerUsersPojo>
	 * @throws BusinessException
	 */
	public abstract List<BuyerUsersPojo> getAllUsers(BuyerMasterPojo buyerMasterPojo)
			throws BusinessException;

	/**
	 * Method to verify the buyer email is not registered with another buyer
	 * 
	 * @param supplierVO
	 * @param email
	 * @return boolean
	 * @throws BusinessException
	 */
	public boolean isBuyerEmailNotRegistered(BuyerVO buyerVO) throws BusinessException;

	/**
	 * Method to return all the Buyers who belongs to a Supplier
	 * 
	 * @param supplierMasterPojo
	 * @return
	 * @throws BusinessException
	 */
	public List<BuyerMasterPojo> getAllBuyers(SupplierMasterPojo supplierMasterPojo)
			throws BusinessException;

}
